#pragma once

#include <windows.h>
#include <cstdlib>
#include <cstdio>
#include <vector>
using namespace std;
#include "events.h"

typedef LRESULT (CALLBACK *KEYBOARD_PROC)(int, WPARAM, LPARAM);
typedef void (*SHK)(int, const int *);
typedef void (*INSTALL_PROC)(HWND);
typedef void (*RELEASE_PROC)();

enum {
	IDC_EDIT				= 1,
	IDC_BTN_ACCEPT			= 2,
	IDM_RESTORE,
	IDM_EXIT,
	IDM_ABOUT
};
static const TCHAR *DEFAULT_KEY_DISPLAY	= TEXT("click to set shortcut");
static const TCHAR *CLICK_INVITATION	= TEXT("press a key combination");

void AddTrayIcon(HWND hWnd, LPSTR szToolTip);
void RemoveTrayIcon(HWND hWnd);
bool GetKeyDescString(LPSTR msg, int len);
bool InitWindow(HINSTANCE hInstance, int nCmdShow);
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
void ProcessTrayNotification(HWND hWnd, WPARAM wParam, LPARAM lParam);

bool ReadOptions();
bool SaveOptions();
